<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    /**
     * Ładowanie zasobów
     */
    protected function _initAutoloader() {
        
        $autoloader = new Zend_Loader_Autoloader_Resource(array(
            'basePath'  => APPLICATION_PATH,
            'namespace' => 'Application',
        ));
        /**
         * Kolekcje obiektów
         */
        $autoloader->addResourceType('collection', 'models/collections/', 'Model_Collection');
        /**
         * Komponenty
         */
        $autoloader->addResourceType('component', 'components/','Component');
    }
    
    protected function _initProfiler() {
        
        $this->bootstrap('db');
                       
        $profiler = new Zend_Db_Profiler_Firebug('All DB Queries');
        $profiler->setEnabled(true);
        
        $this->getResource('db')->setProfiler($profiler);
        
    }
}

